package sanrenxing.dayEnd.backRepertoryTotal.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Description: ta交易数据实体类
 * Date：2021/3/11 0011 下午 3:59
 * @auther ${梁树仁}
 * @version： 1.0
 * @since JDK 1.8
 **/
@Entity
@Table(name = "taDataTable")
public class Tabase implements Serializable {
    @Id
    //交易数据ID
    private int dataId;
    //基金代码ID
    private String fundId;
    //现金账户ID
    private int caId;
    //交易日期
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date dates;
    //交易数量
    private int numbers;
    //结算日期
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endDate;
    //总金额
    private double sumMoney;
    //实际金额
    private double actMoney;
    //单价
    private double price;
    //费用
    private double expenses;
    //代销机构
    private String conagen;
    //交易类型
    private int tranType;
    //交易状态
    private int tranStatus;

    //无参构造方法
    public Tabase() {
    }

    //带参构造方法
    public Tabase(int dataId, String fundId, int caId, Date dates, int numbers, Date endDate, double sumMoney, double actMoney, double price, double expenses, String conagen, int tranType, int tranStatus) {
        this.dataId = dataId;
        this.fundId = fundId;
        this.caId = caId;
        this.dates = dates;
        this.numbers = numbers;
        this.endDate = endDate;
        this.sumMoney = sumMoney;
        this.actMoney = actMoney;
        this.price = price;
        this.expenses = expenses;
        this.conagen = conagen;
        this.tranType = tranType;
        this.tranStatus = tranStatus;
    }

    //不带主键的构造方法
    public Tabase(String fundId, int caId, Date dates, int numbers, Date endDate, double sumMoney, double actMoney, double price, double expenses, String conagen, int tranType, int tranStatus) {
        this.fundId = fundId;
        this.caId = caId;
        this.dates = dates;
        this.numbers = numbers;
        this.endDate = endDate;
        this.sumMoney = sumMoney;
        this.actMoney = actMoney;
        this.price = price;
        this.expenses = expenses;
        this.conagen = conagen;
        this.tranType = tranType;
        this.tranStatus = tranStatus;
    }

    @Override
    public String toString() {
        return "Tabase{" +
                "dataId=" + dataId +
                ", fundId='" + fundId + '\'' +
                ", caId=" + caId +
                ", dates=" + dates +
                ", numbers=" + numbers +
                ", endDate=" + endDate +
                ", sumMoney=" + sumMoney +
                ", actMoney=" + actMoney +
                ", price=" + price +
                ", expenses=" + expenses +
                ", conagen='" + conagen + '\'' +
                ", tranType=" + tranType +
                ", tranStatus=" + tranStatus +
                '}';
    }

    public int getDataId() {
        return dataId;
    }

    public void setDataId(int dataId) {
        this.dataId = dataId;
    }

    public String getFundId() {
        return fundId;
    }

    public void setFundId(String fundId) {
        this.fundId = fundId;
    }

    public int getCaId() {
        return caId;
    }

    public void setCaId(int caId) {
        this.caId = caId;
    }

    public Date getDates() {
        return dates=dates;
    }

    public void setDates(Date dates) {
        this.dates = dates;
    }

    public int getNumbers() {
        return numbers;
    }

    public void setNumbers(int numbers) {
        this.numbers = numbers;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public double getSumMoney() {
        return sumMoney;
    }

    public void setSumMoney(double sumMoney) {
        this.sumMoney = sumMoney;
    }

    public double getActMoney() {
        return actMoney;
    }

    public void setActMoney(double actMoney) {
        this.actMoney = actMoney;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getExpenses() {
        return expenses;
    }

    public void setExpenses(double expenses) {
        this.expenses = expenses;
    }

    public String getConagen() {
        return conagen;
    }

    public void setConagen(String conagen) {
        this.conagen = conagen;
    }

    public int getTranType() {
        return tranType;
    }

    public void setTranType(int tranType) {
        this.tranType = tranType;
    }

    public int getTranStatus() {
        return tranStatus;
    }

    public void setTranStatus(int tranStatus) {
        this.tranStatus = tranStatus;
    }
}